import Layout from '@/layout';

/**
 * PC端路由配置
 * <p>
 * 2025.01.11 geng.chen 按要求, 重组菜单
 */
export const pcwebRoutes = [
  {
    path: '/txs',
    component: Layout,
    redirect: '/txs/salon_private_domain',
    name: 'txs',
    meta: {
      title: '前端管理',
      icon: 'el-icon-s-help',
      roles: ['15', '16', '101', '203', '180'],
    },
    children: [
      {
        path: 'statistics',
        component: () => import('@/views/branch/statistics'),
        meta: { title: '机构数据', icon: 'el-icon-document-copy', roles: ['15', '16', '101', '180'] },
      },
      {
        path: 'clerk',
        component: () => import('@/views/branch/clerklist'),
        meta: { title: '顾客管理', icon: 'peoples', roles: ['15', '16', '101', '203', '180'] },
      },
      {
        path: 'salon_private_domain',
        component: () => import('@/views/branch/SalonPrivateDomain'),
        meta: { title: '私域运营', icon: 'el-icon-eleme', roles: ['15', '16', '180'] },
      },
      {
        path: 'diagnose',
        component: () => import('@/views/branch/diagnoselist'),
        meta: { title: '整店模型', icon: 'el-icon-s-management', roles: ['15', '101', '180'] },
      },
      {
        path: 'account',
        component: () => import('@/views/branch/account'),
        meta: { title: '账号管理', icon: 'el-icon-user-solid', roles: ['15'] }, // '0' 对客户隐藏(仅管理员可见)
      },
      {
        path: 'simplecfg',
        component: () => import('@/views/branch/simplecfg'),
        meta: { title: '配置管理', icon: 'el-icon-setting', roles: ['15'] },
      },
    ],
  },
  {
    path: '/middle/data',
    component: Layout,
    alwaysShow: true,
    redirect: '/middle/data/score',
    meta: {
      title: '中台管理',
      icon: 'el-icon-setting',
      roles: ['15', '101', '102', '180'],
    },
    children: [
      {
        path: 'replay',
        component: () => import('@/views/middle/operator/salon_replay'),
        meta: { title: '管理门店', icon: 'el-icon-user-solid', roles: ['102'] },
      },
      {
        path: 'alarm',
        component: () => import('@/views/baseinfo/alarm'),
        meta: { title: '门店报警', icon: 'el-icon-user', roles: ['102'] },
      },
      {
        path: 'director',
        component: () => import('@/views/middle/operator/director'),
        meta: { title: '管理院长', icon: 'el-icon-user-solid', roles: ['102'] },
      },
      {
        path: 'score',
        component: () => import('@/views/middle/data/score'),
        meta: { title: '管理管家', icon: 'el-icon-user-solid', roles: ['102'] },
      },
      {
        path: 'clerk',
        component: () => import('@/views/clerk/index'),
        meta: { title: '管理顾客', icon: 'peoples', roles: ['101', '102'] },
      },
      {
        path: 'finance',
        component: () => import('@/views/middle/finance/index'),
        meta: { title: '管理财务', icon: 'el-icon-s-finance', roles: ['102'] },
      },
      {
        path: 'statistics',
        component: () => import('@/views/middle/operator/statistics'),
        meta: { title: '门店数据', icon: 'el-icon-document-copy', roles: ['102'] },
      },
      {
        path: 'diagnose',
        component: () => import('@/views/diagnose/index'),
        meta: { title: '整店模型', icon: 'el-icon-s-management', roles: ['15', '101', '102', '180'] },
      },
      {
        path: 'screen',
        component: () => import('@/views/middle/data/screen'),
        meta: { title: '数据大屏', icon: 'el-icon-user-solid', roles: ['102'] },
      },
    ],
  },
  {
    path: '/sys',
    component: Layout,
    redirect: '/sys/admin',
    name: 'sys',
    meta: { title: '系统设置', icon: 'el-icon-setting', roles: ['0', '1'] },
    children: [
      {
        path: 'admin',
        name: 'Admin',
        component: () => import('@/views/sys/admin'),
        meta: { title: '账号管理', icon: 'el-icon-user-solid' },
      },
      {
        path: 'salon',
        name: 'Salon',
        component: () => import('@/views/salon/index'),
        meta: { title: '门店管理', icon: 'el-icon-s-shop' },
      },
      {
        path: 'bigb',
        name: 'Bigb',
        component: () => import('@/views/bigb/index'),
        meta: { title: '大B端', icon: 'el-icon-s-home' },
      },
      {
        path: 'report',
        name: 'Report',
        component: () => import('@/views/report/index'),
        meta: { title: '终极报告', icon: 'documentation', roles: ['1'] }, // 超级管理员菜单
      },
      {
        path: 'tags',
        name: 'TagMgr',
        component: () => import('@/views/tags/index'),
        meta: { title: '标签管理', icon: 'el-icon-paperclip' },
      },
      {
        path: 'dtimeline',
        component: () => import('@/views/diagnose/timeline.vue'),
        meta: { title: '整店时间线', icon: 'el-icon-timer' },
      },
    ],
  },
];
